package top.aicats.pattern.decoratorAndObserver.observer;

import com.google.common.eventbus.Subscribe;

public class Teacher {

    Teacher(String name) {
        this.name = name;
    }

    private String name;
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Subscribe
    public void subscribe(Question question) {
        System.out.println("==========================");
        System.out.println(name + "老师， 你好!");
        System.out.println("您收到了一个来自" + question.getUserName() + "的问题，麻烦您解答下，内容如下：");
        System.out.println(question.getContent());
    }

}
